1
2
3
4 package joeq.Scheduler;
5
6 import joeq.Class.jq_Class;
7 import joeq.Runtime.Reflection;
8
9 /***
10 * @author John Whaley <jwhaley@alum.mit.edu>
11 * @version $Id: HostedThreadUtils.java 1456 2004-03-09 22:01:46Z jwhaley $
12 */
13 public class HostedThreadUtils implements ThreadUtils.Delegate {
14 public jq_Thread getJQThread(java.lang.Thread t) {
15 jq_Class k = joeq.Class.PrimordialClassLoader.getJavaLangThread();
16 joeq.Class.jq_InstanceField f = k.getOrCreateInstanceField("jq_thread", "Ljoeq/Scheduler/jq_Thread;");
17 return (jq_Thread)Reflection.getfield_A(t, f);
18 }
19 }